package cn.yuhan.simplediary.view;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("view")
public class ViewController {

    @GetMapping("/toLogin")
    public String loginPage() {
        return "login";
    }

    @GetMapping("/home")
    public String index() {
        return "index";
    }


    @GetMapping("/register")
    public String registerPage() {
        return "register"; // 注册页面的 Thymeleaf 文件名为 register.html
    }
}